package com.youdo.careyes.model;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.youdo.careyes.R;

/**
 * 文件管理 Holder
 *
 * @author ljb
 * @date 2025.11.28
 * @email 568838953@qq.com
 */
public class AppItemViewHolder {
    public ImageView app_icon;
    public TextView app_name;

    public static AppItemViewHolder create(Context context, View view) {// 使用这个会闪退
        if (null == view) {
            AppItemViewHolder viewHolder = new AppItemViewHolder();
            view = LayoutInflater.from(context).inflate(R.layout.file_ltem_view, null);
            viewHolder.app_icon = (ImageView) view.findViewById(R.id.app_item_icon);
            viewHolder.app_name = (TextView) view.findViewById(R.id.app_name);
            view.setTag(viewHolder);
            return viewHolder;
        } else {
            return (AppItemViewHolder) view.getTag();
        }
    }

}
